Skip to content

Alternative locator syntax - #909

Merged
aaltat merged 7 commits into
robotframework:masterfrom
pekkaklarck:alternative-locator-syntax
Sep 21, 2017
Merged

aaltat merged 7 commits into
robotframework:masterfrom
pekkaklarck:alternative-locator-syntax

Conversation

@pekkaklarck

@pekkaklarck pekkaklarck commented Sep 19, 2017 •

Copy link
Copy Markdown
Member

Implements #908.

Docs missing but code and tests ready for review. We may still want to think about error reporting when a locator doesn't match any element, though.

…k#908.

Still need to decided how to handle locators which just happen to have
`:` in them like `foo:bar`. With the current implementation they fail
with a ValueError becaue `foo` is not a valid locator prefix. Could
also change the logic to handle this so that `:` and `=` are
separators *only* if the part before is a valid prefix.

Docs are missing too.
Didn't notice earlier that _parse_locator was already tested. Decided
to remove old tests because the ones I added are a little simpler due
to the use of `_verify_parse_locator` helper. Added few more tests to
cover everything the old tests covered.
Earlier `foo=bar` caused ValueError if `foo` wasn't a valid
locator. Now this is same as `default=foo=bar`.

Main motivation to the change is avoiding bwic problems now when we
are adding support for locators using`foo:bar` syntax (robotframework#908).
Also tabs -> spaces in edited html file
@aaltat
aaltat merged commit 43e8158 into robotframework:master Sep 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants